##### Housekeeping #####
rm(list=ls())
library('foreign')
library('ggplot2')
### please insert the path where the folder "Replication" is located
# example Users/username/Desktop/Rep/
setwd('/Users/rafaelsuchy/Desktop/Rep/Output/OA/Figures/')
##### Output #####
# outputfile.asinh = 'Paper1_Code_201708/output/OnlineAppFig1a.png' # Set the output file path/name that you desire here.
# outputfile.citepct = 'Paper1_Code_201708/output/OnlineAppFig1b.png' # Set the output file path/name that you desire here.
outputfile.asinh = '../../../Output/OA/Figures/OA_Fig1a.png' # Set the output file path/name that you desire here.
# is not included in the paper
#outputfile.citepct = '../../../Output/OA/Figures/OAFig1b.png' # Set the output file path/name that you desire here.
# Read in cleaned dataset where unit of observation is a paper
pooled = read.dta('../../../Data/Secondary/Pooled_cleaned_CensorPub.dta')
# Set some plotting parameters
my.cex.main = 1.8
my.cex.lab = 1.5
my.cex.axis = 1.5
my.cex.sub = 1.2
### Create plotting data for histograms and normalize bar heights so they sum to 1 ###
hist.asinhcites = hist(x=asinh(pooled$GScites), breaks = seq(asinh(0), asinh(500), length=15))
hist.asinhcites$density = hist.asinhcites$density/sum(hist.asinhcites$density)
hist.citepct = hist(x=pooled$GScitePct, breaks = seq(0,100,by=5))
hist.citepct$density = hist.citepct$density/sum(hist.citepct$density)
################################# Save Plots ###########################################
landscape.a4.width = 11.69
landscape.a4.height = 8.27
scale = 1
pdf.scale = 1
### Distribution of Asinh(Citations)
png(filename = outputfile.asinh,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
pdf(gsub("png", "pdf", outputfile.asinh), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
### Distribution of Citation Percentiles
png(filename = outputfile.citepct,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
pdf(gsub("png", "pdf", outputfile.citepct), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
##### Housekeeping #####
rm(list=ls())
library('foreign')
library('ggplot2')
### please insert the path where the folder "Replication" is located
# example Users/username/Desktop/Rep/
setwd('/Users/rafaelsuchy/Desktop/Rep/Output/OA/Figures/')
##### Output #####
# outputfile.asinh = 'Paper1_Code_201708/output/OnlineAppFig1a.png' # Set the output file path/name that you desire here.
# outputfile.citepct = 'Paper1_Code_201708/output/OnlineAppFig1b.png' # Set the output file path/name that you desire here.
outputfile.asinh = '../../../Output/OA/Figures/OA_Fig1a.png' # Set the output file path/name that you desire here.
# is not included in the paper
#outputfile.citepct = '../../../Output/OA/Figures/OAFig1b.png' # Set the output file path/name that you desire here.
# Read in cleaned dataset where unit of observation is a paper
pooled = read.dta('../../../Data/Secondary/Pooled_cleaned_CensorPub.dta')
# Set some plotting parameters
my.cex.main = 1.8
my.cex.lab = 1.5
my.cex.axis = 1.5
my.cex.sub = 1.2
### Create plotting data for histograms and normalize bar heights so they sum to 1 ###
hist.asinhcites = hist(x=asinh(pooled$GScites), breaks = seq(asinh(0), asinh(500), length=15))
hist.asinhcites$density = hist.asinhcites$density/sum(hist.asinhcites$density)
#hist.citepct = hist(x=pooled$GScitePct, breaks = seq(0,100,by=5))
hist.citepct$density = hist.citepct$density/sum(hist.citepct$density)
################################# Save Plots ###########################################
landscape.a4.width = 11.69
landscape.a4.height = 8.27
scale = 1
pdf.scale = 1
### Distribution of Asinh(Citations)
png(filename = outputfile.asinh,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
pdf(gsub("png", "pdf", outputfile.asinh), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
### Distribution of Citation Percentiles
png(filename = outputfile.citepct,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
pdf(gsub("png", "pdf", outputfile.citepct), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
##### Housekeeping #####
rm(list=ls())
library('foreign')
library('ggplot2')
### please insert the path where the folder "Replication" is located
# example Users/username/Desktop/Rep/
setwd('/Users/rafaelsuchy/Desktop/Rep/Output/OA/Figures/')
##### Output #####
# outputfile.asinh = 'Paper1_Code_201708/output/OnlineAppFig1a.png' # Set the output file path/name that you desire here.
# outputfile.citepct = 'Paper1_Code_201708/output/OnlineAppFig1b.png' # Set the output file path/name that you desire here.
outputfile.asinh = '../../../Output/OA/Figures/OA_Fig1a.png' # Set the output file path/name that you desire here.
# is not included in the paper
outputfile.citepct = '../../../Output/OA/Figures/OAFig1b.png' # Set the output file path/name that you desire here.
# Read in cleaned dataset where unit of observation is a paper
pooled = read.dta('../../../Data/Secondary/Pooled_cleaned_CensorPub.dta')
# Set some plotting parameters
my.cex.main = 1.8
my.cex.lab = 1.5
my.cex.axis = 1.5
my.cex.sub = 1.2
### Create plotting data for histograms and normalize bar heights so they sum to 1 ###
hist.asinhcites = hist(x=asinh(pooled$GScites), breaks = seq(asinh(0), asinh(500), length=15))
hist.asinhcites$density = hist.asinhcites$density/sum(hist.asinhcites$density)
hist.citepct = hist(x=pooled$GScitePct, breaks = seq(0,100,by=5))
hist.citepct$density = hist.citepct$density/sum(hist.citepct$density)
################################# Save Plots ###########################################
landscape.a4.width = 11.69
landscape.a4.height = 8.27
scale = 1
pdf.scale = 1
### Distribution of Asinh(Citations)
png(filename = outputfile.asinh,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
pdf(gsub("png", "pdf", outputfile.asinh), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
### Distribution of Citation Percentiles
png(filename = outputfile.citepct,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
pdf(gsub("png", "pdf", outputfile.citepct), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
##### Housekeeping #####
rm(list=ls())
library('foreign')
library('ggplot2')
### please insert the path where the folder "Replication" is located
# example Users/username/Desktop/Rep/
setwd('/Users/rafaelsuchy/Desktop/Rep/Output/OA/Figures/')
##### Output #####
# outputfile.asinh = 'Paper1_Code_201708/output/OnlineAppFig1a.png' # Set the output file path/name that you desire here.
# outputfile.citepct = 'Paper1_Code_201708/output/OnlineAppFig1b.png' # Set the output file path/name that you desire here.
outputfile.asinh = '../../../Output/OA/Figures/OA_Fig1a.png' # Set the output file path/name that you desire here.
# is not included in the paper
#outputfile.citepct = '../../../Output/OA/Figures/OAFig1b.png' # Set the output file path/name that you desire here.
# Read in cleaned dataset where unit of observation is a paper
pooled = read.dta('../../../Data/Secondary/Pooled_cleaned_CensorPub.dta')
# Set some plotting parameters
my.cex.main = 1.8
my.cex.lab = 1.5
my.cex.axis = 1.5
my.cex.sub = 1.2
### Create plotting data for histograms and normalize bar heights so they sum to 1 ###
hist.asinhcites = hist(x=asinh(pooled$GScites), breaks = seq(asinh(0), asinh(500), length=15))
hist.asinhcites$density = hist.asinhcites$density/sum(hist.asinhcites$density)
#hist.citepct = hist(x=pooled$GScitePct, breaks = seq(0,100,by=5))
#hist.citepct$density = hist.citepct$density/sum(hist.citepct$density)
################################# Save Plots ###########################################
landscape.a4.width = 11.69
landscape.a4.height = 8.27
scale = 1
pdf.scale = 1
### Distribution of Asinh(Citations)
png(filename = outputfile.asinh,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
pdf(gsub("png", "pdf", outputfile.asinh), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
### Distribution of Citation Percentiles
png(filename = outputfile.citepct,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
pdf(gsub("png", "pdf", outputfile.citepct), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.citepct, freq=FALSE,
main = "", xlab = "Google Scholar Citation Percentiles",
sub = "A small amount of noise is added to citations in order to break ties.",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
dev.off()
##### Housekeeping #####
rm(list=ls())
library('foreign')
library('ggplot2')
### please insert the path where the folder "Replication" is located
# example Users/username/Desktop/Rep/
setwd('/Users/rafaelsuchy/Desktop/Rep/Output/OA/Figures/')
##### Output #####
# outputfile.asinh = 'Paper1_Code_201708/output/OnlineAppFig1a.png' # Set the output file path/name that you desire here.
# outputfile.citepct = 'Paper1_Code_201708/output/OnlineAppFig1b.png' # Set the output file path/name that you desire here.
outputfile.asinh = '../../../Output/OA/Figures/OA_Fig1a.png' # Set the output file path/name that you desire here.
# is not included in the paper
#outputfile.citepct = '../../../Output/OA/Figures/OAFig1b.png' # Set the output file path/name that you desire here.
# Read in cleaned dataset where unit of observation is a paper
pooled = read.dta('../../../Data/Secondary/Pooled_cleaned_CensorPub.dta')
# Set some plotting parameters
my.cex.main = 1.8
my.cex.lab = 1.5
my.cex.axis = 1.5
my.cex.sub = 1.2
### Create plotting data for histograms and normalize bar heights so they sum to 1 ###
hist.asinhcites = hist(x=asinh(pooled$GScites), breaks = seq(asinh(0), asinh(500), length=15))
hist.asinhcites$density = hist.asinhcites$density/sum(hist.asinhcites$density)
#hist.citepct = hist(x=pooled$GScitePct, breaks = seq(0,100,by=5))
#hist.citepct$density = hist.citepct$density/sum(hist.citepct$density)
################################# Save Plots ###########################################
landscape.a4.width = 11.69
landscape.a4.height = 8.27
scale = 1
pdf.scale = 1
### Distribution of Asinh(Citations)
png(filename = outputfile.asinh,
height = landscape.a4.height*scale, width = landscape.a4.width*scale,
units = "in", res = 300)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
pdf(gsub("png", "pdf", outputfile.asinh), paper = "special",
height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
plot(hist.asinhcites, freq=FALSE,
main = "", xlab = "Asinh(Citations)",
cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis)
dev.off()
### Distribution of Citation Percentiles
#png(filename = outputfile.citepct,
#    height = landscape.a4.height*scale, width = landscape.a4.width*scale,
#    units = "in", res = 300)
#plot(hist.citepct, freq=FALSE,
#     main = "", xlab = "Google Scholar Citation Percentiles",
#     sub = "A small amount of noise is added to citations in order to break ties.",
#     cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
#dev.off()
#pdf(gsub("png", "pdf", outputfile.citepct), paper = "special",
#    height = landscape.a4.height*pdf.scale, width = landscape.a4.width*pdf.scale)
#plot(hist.citepct, freq=FALSE,
#     main = "", xlab = "Google Scholar Citation Percentiles",
#     sub = "A small amount of noise is added to citations in order to break ties.",
#     cex.main = my.cex.main, cex.lab = my.cex.lab, cex.axis = my.cex.axis, cex.sub = my.cex.sub)
#dev.off()
